<?php

use Illuminate\Database\Seeder;
use App\Models\User;
use App\Models\UserInfo;

class UserInfoTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        if(env('APP_ENV') == 'local'){
            $user = User::where('username', 'simulate-user')->first();
            UserInfo::create([
                    'user_id' => $user->id,
                    'current_device_id' => 3,
                    //openid
                    'open_id' => 'asdf1313',
                    //微信昵称
                    'wx_nickname' => 'nickname',
                    //微信头像
                    'wx_head_img_url' => '1a3sd1f3a1f',
                    //性别
                    'wx_sex' => 1,
                    //市
                    'wx_city' => 'city',
                    //省
                    'wx_province' => 'province',
                    //国家
                    'wx_country' => 'country',
                    'name' => 'test-user'
                ]);
        }
    }
}
